/*
 * Selling Partner API for Orders
 *
 * Use the Orders Selling Partner API to programmatically retrieve order information. With this API, you can develop fast, flexible, and custom applications to manage order synchronization, perform order research, and create demand-based decision support tools.   _Note:_ For the JP, AU, and SG marketplaces, the Orders API supports orders from 2016 onward. For all other marketplaces, the Orders API supports orders for the last two years (orders older than this don't show up in the response).
 *
 * The version of the OpenAPI document: v0
 * Generated by: https://github.com/openapitools/openapi-generator.git
 */


using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = software.amzn.spapi.Client.OpenAPIDateConverter;

namespace software.amzn.spapi.Model.orders.v0
{
    /// <summary>
    /// The order&#39;s regulated information along with its verification status.
    /// </summary>
    [DataContract(Name = "OrderRegulatedInfo")]
    public partial class OrderRegulatedInfo : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="OrderRegulatedInfo" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected OrderRegulatedInfo() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="OrderRegulatedInfo" /> class.
        /// </summary>
        /// <param name="amazonOrderId">An Amazon-defined order identifier, in 3-7-7 format. (required).</param>
        /// <param name="regulatedInformation">regulatedInformation (required).</param>
        /// <param name="requiresDosageLabel">When true, the order requires attaching a dosage information label when shipped. (required).</param>
        /// <param name="regulatedOrderVerificationStatus">regulatedOrderVerificationStatus (required).</param>
        public OrderRegulatedInfo(string amazonOrderId = default(string), RegulatedInformation regulatedInformation = default(RegulatedInformation), bool requiresDosageLabel = default(bool), RegulatedOrderVerificationStatus regulatedOrderVerificationStatus = default(RegulatedOrderVerificationStatus))
        {
            // to ensure "amazonOrderId" is required (not null)
            if (amazonOrderId == null)
            {
                throw new ArgumentNullException("amazonOrderId is a required property for OrderRegulatedInfo and cannot be null");
            }
            this.AmazonOrderId = amazonOrderId;
            // to ensure "regulatedInformation" is required (not null)
            if (regulatedInformation == null)
            {
                throw new ArgumentNullException("regulatedInformation is a required property for OrderRegulatedInfo and cannot be null");
            }
            this.RegulatedInformation = regulatedInformation;
            this.RequiresDosageLabel = requiresDosageLabel;
            // to ensure "regulatedOrderVerificationStatus" is required (not null)
            if (regulatedOrderVerificationStatus == null)
            {
                throw new ArgumentNullException("regulatedOrderVerificationStatus is a required property for OrderRegulatedInfo and cannot be null");
            }
            this.RegulatedOrderVerificationStatus = regulatedOrderVerificationStatus;
        }

        /// <summary>
        /// An Amazon-defined order identifier, in 3-7-7 format.
        /// </summary>
        /// <value>An Amazon-defined order identifier, in 3-7-7 format.</value>
        [DataMember(Name = "AmazonOrderId", IsRequired = true, EmitDefaultValue = true)]
        public string AmazonOrderId { get; set; }

        /// <summary>
        /// Gets or Sets RegulatedInformation
        /// </summary>
        [DataMember(Name = "RegulatedInformation", IsRequired = true, EmitDefaultValue = true)]
        public RegulatedInformation RegulatedInformation { get; set; }

        /// <summary>
        /// When true, the order requires attaching a dosage information label when shipped.
        /// </summary>
        /// <value>When true, the order requires attaching a dosage information label when shipped.</value>
        [DataMember(Name = "RequiresDosageLabel", IsRequired = true, EmitDefaultValue = true)]
        public bool RequiresDosageLabel { get; set; }

        /// <summary>
        /// Gets or Sets RegulatedOrderVerificationStatus
        /// </summary>
        [DataMember(Name = "RegulatedOrderVerificationStatus", IsRequired = true, EmitDefaultValue = true)]
        public RegulatedOrderVerificationStatus RegulatedOrderVerificationStatus { get; set; }

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("class OrderRegulatedInfo {\n");
            sb.Append("  AmazonOrderId: ").Append(AmazonOrderId).Append("\n");
            sb.Append("  RegulatedInformation: ").Append(RegulatedInformation).Append("\n");
            sb.Append("  RequiresDosageLabel: ").Append(RequiresDosageLabel).Append("\n");
            sb.Append("  RegulatedOrderVerificationStatus: ").Append(RegulatedOrderVerificationStatus).Append("\n");
            sb.Append("}\n");
            return sb.ToString();
        }

        /// <summary>
        /// Returns the JSON string presentation of the object
        /// </summary>
        /// <returns>JSON string presentation of the object</returns>
        public virtual string ToJson()
        {
            return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
        }

        /// <summary>
        /// To validate all properties of the instance
        /// </summary>
        /// <param name="validationContext">Validation context</param>
        /// <returns>Validation Result</returns>
        IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
        {
            yield break;
        }
    }

}
